#-------------------------------------------------
# Created on 2018/11/11
#-------------------------------------------------

#By default QT contains core and gui modules, if gui is not needed, remove it.
QT -= gui
QT += core

TARGET = RIVIAImgProc

#If runnable, this should be app.
TEMPLATE = lib

DEFINES += RIVIAIMGPROC_LIBRARY

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

include(../global.pri)

INCLUDEPATH += \
    ./Include \
    ./../RIVIAEntity/Include \
    ./../RIVIAResource/Include \
    ./../RIVIACommon/Include \
    ./../../Externals/opencv/include  \


#链接库：-L指定目录，-l指定库的名称（无需后缀，.lib，.a, .so都适用）
unix{
    CONFIG(debug, debug|release){
        contains(QT_ARCH, x86_64){
            LIBS += -L$$PWD/../../build/bin/X64/Debug \
                    -lRIVIAEntity_L64d \
                    -lRIVIAResource_L64d \
                    -lRIVIACommon_L64d \
                    -L$$PWD/../../../../../usr/local/lib64 \
                    -lopencv_world \
        } else {
            LIBS += -L$$PWD/../../build/bin/X86/Debug \
                    -lRIVIAEntity_L32d \
                    -lRIVIAResource_L32d \
                    -lRIVIACommon_L32d \
        }
    }

    CONFIG(release, debug|release){
        contains(QT_ARCH, x86_64){
            LIBS += -L$$PWD/../../build/bin/X64/Release \
                    -lRIVIAEntity_L64 \
                    -lRIVIAResource_L64 \
                    -lRIVIACommon_L64 \
                    -L$$PWD/../../../../../usr/local/lib64 \
                    -lopencv_world \
        } else {
            LIBS += -L$$PWD/../../build/bin/X86/Release \
                    -lRIVIAEntity_L32 \
                    -lRIVIAResource_L32 \
                    -lRIVIACommon_L32 \
        }
    }
}
win32{
    CONFIG(debug, debug|release){
        contains(QT_ARCH, x86_64){
            LIBS += -L$$PWD/../../build/bin/X64/Debug \
                    -lRIVIAEntity_W64d \
                    -lRIVIAResource_W64d \
                    -lRIVIACommon_W64d \
                    -L$$PWD/../../Externals/opencv/lib \
                    -lopencv_world343d \
        } else {
            LIBS += -L$$PWD/../../build/bin/X86/Debug \
                    -lRIVIAEntity_W32d \
                    -lRIVIAResource_W32d \
                    -lRIVIACommon_W32d \
        }
    }

    CONFIG(release, debug|release){
        contains(QT_ARCH, x86_64){
            LIBS += -L$$PWD/../../build/bin/X64/Release \
                    -lRIVIAEntity_W64 \
                    -lRIVIAResource_W64 \
                    -lRIVIACommon_W64 \
                    -L$$PWD/../../Externals/opencv/lib \
                    -lopencv_world343 \
        } else {
            LIBS += -L$$PWD/../../build/bin/X86/Release \
                    -lRIVIAEntity_W32 \
                    -lRIVIAResource_W32 \
                    -lRIVIACommon_W32 \
        }
    }
}

SOURCES += \
    Src/RIVIACvtColor.cpp \
    Src/Filters/RIVIABlur.cpp \
    Src/Colors/RIVIABrightnessContrast.cpp \
    Src/Tools/RIVIAToolMgr.cpp \
    Src/Tools/RIVIAToolBase.cpp \
    Src/Tools/RIVIAPencilTool.cpp \
    Src/IRIVIATool.cpp \
    Src/Tools/RIVIAEraserTool.cpp \
    Src/Tools/RIVIABlurOrSharpenTool.cpp

HEADERS += \
    Include/RIVIAImgProc_global.h \
    Include/RIVIACvtColor.h \
    Include/Filters/RIVIABlur.h \
    Include/Colors/RIVIABrightnessContrast.h \
    Include/Tools/RIVIAToolMgr.h \
    Include/Tools/RIVIAToolBase.h \
    Include/Tools/RIVIAPencilTool.h \
    Include/IRIVIATool.h \
    Include/Tools/ToolState.h \
    Include/Tools/RIVIAEraserTool.h \
    Include/Tools/RIVIABlurOrSharpenTool.h

unix {
    target.path = /usr/local/lib64
    INSTALLS += target
}
